package cn.zhang.order.client;

import cn.zhang.order.client.impl.UserFallBackImpl;
import com.ruoyi.common.core.web.domain.AjaxResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

@FeignClient(name = "zhang-user",fallback = UserFallBackImpl.class)
@ResponseBody
public interface UserClient {
    /**
     * 5. 根据用户名查询用户
     * @param username
     * @return
     */
    @GetMapping("/user/findByName/{username}")
    AjaxResult findByName(@PathVariable("username") String username);
}
